﻿using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Productions
{
    public interface IProWorkorder
    {
        public Task<IEnumerable<ProWorkorder>> GatAllAsync();

        public Task<IEnumerable<ProWorkorder>> GetAsync(int PageIndex, int pageSize, string WorkorderCode, string WorkorderName, string ProductCode,string ProductName,string ClientName,string RequestDate);

        public Task<int> GetCountAsync(string WorkorderCode, string WorkorderName, string ProductCode, string ProductName, string ClientName, string RequestDate);

        public Task<bool> UpdateAsync(ProWorkorder model);

        public Task<bool> AddAsync(ProWorkorder model);

        public Task<bool> DeleteAsync(int[] Ids);

        public Task<bool> DeleteAsync(int Id);




        /// <summary>
        /// 获取没有领料的生产工单
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="WorkorderCode"></param>
        /// <param name="WorkorderName"></param>
        /// <param name="ProductCode"></param>
        /// <param name="ProductName"></param>
        /// <param name="ClientName"></param>
        /// <param name="RequestDate"></param>
        /// <returns></returns>
        public Task<IEnumerable<ProWorkorder>> GetNonPickAsync(int PageIndex, int pageSize, string WorkorderCode, string WorkorderName, string ProductCode, string ProductName, string ClientName, string RequestDate);


        /// <summary>
        /// 获取没有领料的生产工单数量
        /// </summary>
        /// <param name="WorkorderCode"></param>
        /// <param name="WorkorderName"></param>
        /// <param name="ProductCode"></param>
        /// <param name="ProductName"></param>
        /// <param name="ClientName"></param>
        /// <param name="RequestDate"></param>
        /// <returns></returns>
        public Task<int> GetNonPickCountAsync(string WorkorderCode, string WorkorderName, string ProductCode, string ProductName, string ClientName, string RequestDate);
    }
}
